﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CSF.BusinessCore.BLL;
using CSF.Security.Data;
using Ict.DataAccess;

namespace CSF.Security.BLL
{
    public class PermissionBLL : TransactionConfigLogic<Permission>
    {
        public List<Permission> GetByAppCode(string appCode)
        {
            var q = from p in DataContext.Select<Permission>()
                    join p1 in DataContext.Select<Application>() on p.ApplicationId equals p1.Id
                    where p1.Code == appCode
                    select p;
            return q.ToList();
        }
    }
}
